f :: [Int] -> [Int]
f lst = snd $ foldl (\a b -> let f = fst a
                                 s = snd a
                                 isOdd = f `mod` 2 == 0 
                                 nextA = f + 1
                             in if isOdd 
                                   then (nextA, s)  
                                   else (nextA, s++[b])) (0, []) lst
                             
-- This part deals with the Input and Output and can be used as it is. Do not modify it.
main = do
   inputdata <- getContents
   mapM_ (putStrLn. show). f. map read. lines $ inputdata
